package com.sfpay.coreplatform.account.service.inner.impl;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.sfpay.coreplatform.account.service.inner.IGetAsyncAccounts;
import com.sfpay.coreplatform.account.service.inner.IHessianServiceFactory;
import com.sfpay.pubcenter.domain.BaseParam;
import com.sfpay.pubcenter.enums.SystemEnums.GroupCode;

/**
 * 
 * 
 * 类说明：从配置参数获取异步记账账户
 *  
 * 
 * <p>
 * 详细描述：从配置参数获取异步记账账户
 *   
 * 
 * @author sfhq104
 *   
 * CreateDate: 2012-4-10
 */

@Service
public class GetAsyncAccountsImpl implements IGetAsyncAccounts {

	@Resource
	private IHessianServiceFactory hessianServiceFactory;
	
	/* (non-Javadoc)
	 * @see com.sfpay.account.service.IGetAsyncAccounts#getAsyncAccountsFromConfigCenter()
	 */
	@Override
	@Cacheable(value="midAccountCache")
	public Map<String, BaseParam> getAsyncAccountsFromConfigCenter() {
		Map<String,BaseParam> acctCaches=hessianServiceFactory.getConfigruationCenter().findParamByGroupCode(GroupCode.MIDACCOUNT);
		return acctCaches;
	}

}
